const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  lintOnSave: false,
  devServer: {
    proxy: {
      '/CreateLocation': {
        target: 'http://localhost:9002', // 后端服务的地址,页面所在服务器
        changeOrigin: true, // 允许跨域
        // pathRewrite: {
        //   '^/calculate': '/calculate' // 路径重写
        },
      '/ShowLocations': {
          target: 'http://localhost:9002',
          changeOrigin: true,
        }
      }
    },
    chainWebpack: config => {
      config
        .plugin('define')
        .tap(args => {
          args[0]['__VUE_PROD_HYDRATION_MISMATCH_DETAILS__'] = false
          return args
        })
    }
})
